<div local-class="content">
  <div local-class="title">
    {{canvas-block-title-content
      block=block
      changeBlockType=changeBlockType
      editingEnabled=editingEnabled
      filteredTemplates=filteredTemplates
      showTemplates=showTemplates
      isFocused=isFocused
      isMultiBlock=isMultiBlock
      navigateAutocomplete=(action 'navigateAutocomplete')
      selectTemplateByIndex=(action "selectTemplateByIndex" selectedIndex)
      onAutocompleteEscape=(action 'updateFilteredTemplates')
      onBlockDeletedLocally=onBlockDeletedLocally
      onBlockReplacedLocally=onBlockReplacedLocally
      onBlurBlock=onBlurBlock
      onDoubleSelectAll=onDoubleSelectAll
      onDoubleSelectToEnd=onDoubleSelectToEnd
      onDoubleSelectToStart=onDoubleSelectToStart
      onFocusBlock=onFocusBlock
      onRedo=onRedo
      onUndo=onUndo
      onMultiBlockSelectUp=onMultiBlockSelectUp
      onMultiBlockSelectDown=onMultiBlockSelectDown
      onNavigateDown=onNavigateDown
      onNavigateLeft=onNavigateLeft
      onNavigateRight=onNavigateRight
      onNavigateUp=onNavigateUp
      onBlockContentUpdatedLocally=onBlockContentUpdatedLocally
      onBlockTypeUpdatedLocally=onBlockTypeUpdatedLocally
      onNewBlockInsertedLocally=onNewBlockInsertedLocally
      pasteBlocksAfter=pasteBlocksAfter}}
  </div>

  {{#if actionsComponent}}
    <div local-class="actions">
      {{component actionsComponent}}
    </div>
  {{/if}}
</div>

{{#if showTemplates}}
  <div local-class="suggestions">
    {{#ui-list-filter
      value=block.content
      isShowingSelect=(mut isShowingSelect)
      onFilter=(action filterTemplates)
      onResolveFilter=(action 'updateFilteredTemplates')
      results=filteredTemplates
      as |templates|}}
        {{#if templates}}
          <div local-class="suggestions-content">
            {{#each templates as |template index|}}
              <div local-class="template {{if (eq index selectedIndex) "template-is-selected"}}" onmouseover={{action "updateSelectedIndex" index}} onmousedown={{action "remainFocused"}} onclick={{action "selectTemplate" template}}>{{template.blocks.0.content}}</div>
            {{/each}}
          </div>
        {{/if}}
    {{/ui-list-filter}}
  </div>
{{/if}}

{{#if bylineComponent}}
  <div local-class="byline">
    {{component bylineComponent}}
  </div>
{{/if}}
